# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-bioframe
pkgver=0.6.4
pkgrel=1
pkgdesc="Pandas utilities for tab-delimited and other genomic data files"
url="https://github.com/open2c/bioframe"
arch="noarch !armhf !armv7 !x86 !riscv64" #assertion errors
options="net"
license="MIT"
depends="py3-matplotlib py3-numpy py3-pandas py3-yaml py3-requests py3-typing-extensions py3-setuptools"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-hatchling py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/open2c/bioframe/archive/v$pkgver/bioframe-$pkgver.tar.gz"
builddir="$srcdir/bioframe-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl

	rm -r "$pkgdir"/usr/lib/python3.*/site-packages/bioframe/io/data/
}

sha512sums="
f9698c55872cb770676189f4f464f19468cec9a727234ab9ce5ee79c4bfe405ce5897b43112339b4047bd15db3654074e2e120290470183959513943a01fc519  bioframe-0.6.4.tar.gz
"
